package leetcode.tree;

import leetcode.tree.common.TreeNode;
import leetcode.tree.common.TreeUtils;

import java.util.Arrays;
import java.util.List;

/**
 * AC
 */
class Solution103 {
    public List<List<Integer>> zigzagLevelOrder(TreeNode root) {
        return TreeUtils.zigzagLevelOrder(root);
    }
}

/**
 * 103. 二叉树的锯齿形层序遍历
 */
public class leetcode103 {

    public static void main(String[] args) {

//        Integer[] arrP = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};
//        Integer[] arrP = {1};
        Integer[] arrP = {};
        List<Integer> nodeListP = Arrays.asList(arrP);
        TreeNode root = TreeUtils.generateAtreeByBFSList(nodeListP);

        Solution103 solution103 = new Solution103();

        System.out.println("题目结果=====================");
        System.out.println(solution103.zigzagLevelOrder(root));


    }
}
